package com.jvm;

public class StringTest {

    public static void test() {
        String s1 = "a";
        String s2 = "b";
        String s3 = "ab";
        /**
         * StringBuilder s4=new StringBuilder();
         * s4.append("a");
         * s4.append("b");
         * s4.toString()   --> 类似于
         */
        String s4 = s1 + s2;
        s4.intern();
        System.out.println(s4 == s3);
    }

    public static void main(String[] args) {
        test();
    }

}
